package com.echo.neocommunity.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.echo.neocommunity.pojo.Message;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

@Mapper
public interface MessageMapper extends BaseMapper<Message> {
    List<Message> selectConversations(int userId,int offset,int limit);

    int selectConversationCount(int userId);

    List<Message> selectLetters(String conversationId,int offset,int limit);

    int selectLetterCount(String conversationId);

    int selectLetterUnreadCount(int userId,String conversationId);


    //查询某个主题下的最新通知
    Message selectLastNotice(int userId,String topic);
    //查询某个主题下包含的数量
    int MessageCount(int userId,String topic);
    //查询未读数量
    Integer MessageUnreadCount(int userId,String topic);

    //查询某个主题下的所有通知
    public List<Message> selectAllNotice(int userId,String topic,int offset,int limit);

}
